next up previous
Next: 4.6 Shared Software Buffers Up: 4 Virtualizing SGI Graphics Previous: 4.4 Fast Buffer Swaps

4.5 Window Display Mode Validation

In the discussion of buffer swapping so far, it was assumed that the window to be swapped was indeed on an unshared DID. Since DIDs are a limited hardware resource, this may not necessarily be true. In this case, DIDs must be virtualized.

Similar to a rendering node's clip resource, rendering nodes also have a ``swappable window'' resource. The resource is valid if the X server has placed the window on an unshared DID. It is invalid if the window's DID is shared by other windows or the X server has revoked the ability to swap (this need is made clear when mixing OpenGL and X rendering is discussed).

If a process issues the ``swap buffer'' ioctl and the process's current rendering node does not have its ``swappable window'' resource valid, a message is sent to the X server requesting the X server place the window on an unshared DID and validate the rendering node's ``swappable window'' resource. The X server complies with the request and validates the ``swappable window'' for the window via a board manager reserved ioctl. Once validated, the buffer swap can then be scheduled.

  
Figure 3: Example of a glXSwapBuffers being performed on window 2 which shares the same display ID (DID 1)with window 4. Before the buffer swap can be performed, the X server must rewrite the display IDs such that window 2 is on an unshared display ID (DID 3).

As in the virtualization of CIDs, unshared DIDs may be stolen from windows already on an unshared DID to validate the resources of rendering nodes attempting buffer swaps. When a DID is stolen, the window previously on an unshared DID will have to find another window to share a DID with that has the identical display mode (because a window should never be assigned a DID with a display mode not matching the correct display mode for the window). Forcing a window to share a DID with another window may force that other window to have its ``swap buffer'' resource invalidated since it might have previously had an unshared DID allocated to it. Figure 3 is an example of a window needing to be assigned an unshared DID.



next up previous
Next: 4.6 Shared Software Buffers Up: 4 Virtualizing SGI Graphics Previous: 4.4 Fast Buffer Swaps



mjk@sgi.com